<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>

    console.log(111) //立即执行，打印111

    setTimeout(function () { //只是函数的声明，未执行
      console.log(222) //等到1s之后执行
    }, 1000)

    console.log(333) //立即执行，打印333

    /*
    111
    333
    222
    */






  </script>
</body>

</html>